import { defineComponent as m, reactive as g, watch as C, toRefs as I } from "vue-demi";
const $ = /-(\w)/g;
function l(t) {
  return t.replace($, (s, e) => e.toUpperCase());
}
const E = "frog";
function y(t) {
  return t = `${E}-${t}`, [t, l(`-${t}`)];
}
function D(t) {
  return t.install = (s) => {
    const e = t.name, [n, a] = y(e);
    s.component(n, t), s.component(a, t), s.component(e, t), s.component(l(`-${e}`), t);
  }, t;
}
const R = (t) => t != null && t.startsWith("http") || t != null && t.startsWith("data:image") ? t : t ? `data:image/png;base64,${t}` : "", S = (t) => {
  if (t) {
    const s = t == null ? void 0 : t.split(" ")[0];
    let e = ["\u3007", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D", "\u5341"], n = s.replace(/[^0-9]+/g, ""), a = e[n[0]] + e[n[1]] + e[n[2]] + e[n[3]], u = n[4] === "0" ? e[n[5]] : e[10] + (n[5] > 0 ? e[n[5]] : ""), o = "";
    return n[6] === "0" ? o = e[n[7]] : n[6] === "1" ? n[7] === "0" ? o = e[10] : o = e[10] + e[n[7]] : (n[6] === "2" || n[6] === "3") && (n[7] === "0" ? o = e[n[6]] + e[10] : o = e[n[6]] + e[10] + e[n[7]]), a + " \u5E74 " + u + " \u6708 " + o + " \u65E5 ";
  }
};
var T = function() {
  var t = this, s = t.$createElement, e = t._self._c || s;
  return e("div", {
    attrs: {
      id: "certificate-container"
    }
  }, [e("h2", {
    staticClass: "title"
  }, [t._v("\u9053\u8DEF\u8FD0\u8F93\u4ECE\u4E1A\u8D44\u683C\u57F9\u8BAD\u7ED3\u4E1A\u8BC1\u4E66")]), e("p", {
    staticClass: "text-right"
  }, [t._v("[\xA0\u7ED3\u4E1A\u8BC1\u4E66\u7F16\u53F7: " + t._s(t.studentInfo.finishStudyCode) + "\xA0]")]), e("div", {
    staticClass: "container"
  }, [e("p", {
    staticClass: "desc"
  }, [t._v(" \u5B66\u5458 "), e("span", {
    staticClass: "line"
  }, [t._v(t._s(t.studentInfo.name))]), t._v(" \uFF08\u8EAB\u4EFD\u8BC1\u53F7\uFF1A" + t._s(t.studentInfo.cardNo) + "\uFF09\u4E8E " + t._s(t.studentInfo.startStudyDate) + " \u81F3 " + t._s(t.studentInfo.endStudyDate) + " \u671F\u95F4\u53C2\u52A0\u6211\u6821"), e("span", {
    staticClass: "line"
  }, [t._v(t._s(t.studentInfo.applyTypeAlias))]), t._v(" \u4ECE\u4E1A\u8D44\u683C\u57F9\u8BAD\uFF0C\u5E76\u6309\u8981\u6C42\u5B8C\u6210\u4E86\u6559\u5B66\u5927\u7EB2\u89C4\u5B9A\u5B66\u65F6\u7684\u57F9\u8BAD\uFF0C\u51C6\u4E88\u7ED3\u4E1A\uFF01 ")]), e("div", {
    staticClass: "picture"
  }, [t.studentInfo.headImg ? e("img", {
    attrs: {
      src: t.getImage(t.studentInfo.headImg),
      fit: "['fill']"
    }
  }) : t._e()])]), e("div", [t._v("(\u62A5\u540D\u7F16\u53F7\uFF1A" + t._s(t.studentInfo.enrollBatch) + ")")]), e("div", {
    staticClass: "signature"
  }, [e("div", {
    staticClass: "signature_inner"
  }, [e("div", [t._v("\u57F9\u8BAD\u5355\u4F4D(\u76D6\u7AE0)\uFF1A")]), e("div", {
    staticClass: "sign"
  }, [e("span", [t._v(t._s(t.studentInfo.graduationDatetime))]), e("div", {
    staticClass: "sign_pic"
  }, [t.studentInfo.signaturePhoto ? e("img", {
    attrs: {
      src: t.getImage(t.studentInfo.signaturePhoto),
      fit: "['fill']"
    }
  }) : t._e()])])]), e("div", {
    staticClass: "signtime"
  }, [t._v(t._s(t.dateToChinese(t.studentInfo.graduationDatetime)))])])]);
}, b = [];
function N(t, s, e, n, a, u, o, p) {
  var i = typeof t == "function" ? t.options : t;
  s && (i.render = s, i.staticRenderFns = e, i._compiled = !0), n && (i.functional = !0), u && (i._scopeId = "data-v-" + u);
  var f;
  if (o ? (f = function(r) {
    r = r || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !r && typeof __VUE_SSR_CONTEXT__ < "u" && (r = __VUE_SSR_CONTEXT__), a && a.call(this, r), r && r._registeredComponents && r._registeredComponents.add(o);
  }, i._ssrRegister = f) : a && (f = p ? function() {
    a.call(
      this,
      (i.functional ? this.parent : this).$root.$options.shadowRoot
    );
  } : a), f)
    if (i.functional) {
      i._injectStyles = f;
      var v = i.render;
      i.render = function(h, c) {
        return f.call(c), v(h, c);
      };
    } else {
      var d = i.beforeCreate;
      i.beforeCreate = d ? [].concat(d, f) : [f];
    }
  return {
    exports: t,
    options: i
  };
}
const z = m({
  name: "certificated",
  props: {
    childData: {
      type: Object,
      default: () => {
      }
    }
  },
  setup(t, { root: s }) {
    const e = g({
      studentInfo: {}
    });
    return C(() => t.childData, (n) => {
      e.studentInfo = { ...n };
      const { oneApplyTime: a, graduationDatetime: u } = e.studentInfo;
      e.studentInfo.startTime = a == null ? void 0 : a.split(" ")[0], e.studentInfo.endTime = u == null ? void 0 : u.split(" ")[0];
    }, {
      deep: !0,
      immediate: !0
    }), {
      ...I(e),
      getImage: R,
      dateToChinese: S
    };
  }
}), _ = {};
var w = /* @__PURE__ */ N(
  z,
  T,
  b,
  !1,
  B,
  "fce2bb8e",
  null,
  null
);
function B(t) {
  for (let s in _)
    this[s] = _[s];
}
const O = /* @__PURE__ */ function() {
  return w.exports;
}(), U = D(O);
export {
  U as default
};
